package com.campus.controller;

import com.campus.entity.Course;
import com.campus.service.CourseService;
import com.campus.web.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/course")
public class CourseController {
    @Autowired
    private CourseService courseService;
    @PostMapping("/insert")
    public ResponseResult addCourse(@RequestBody Course course) {
        courseService.insertCourse(course);
        return ResponseResult.ok("添加成功");
    }
}
